 <script language="javascript">
    
    function insertWizzard(document) {
        

            //html = $("#com").attr("value");

            //alert(html);
            
            
   /*          extension = getFileExtension(url);     
    
     switch(extension)
        {
        case "jpg":
            insertText("<p>"); 
            insertImage(url);
            insertText("</p>"); 
              break;
        
        case "jpeg":
            insertText("<p>"); 
            insertImage(url);
            insertText("</p>"); 
              break;


        case "png":
            insertText("<p>"); 
            insertImage(url);
            insertText("</p>"); 
              break;

        case "gif":
            insertText("<p>"); 
            insertImage(url);
            insertText("</p>"); 
              break;
              
        case "mp3":
            insertText("<p>"); 
            insertMP3Element(url);
            insertText("</p>"); 
          break;

        case "flv":
            insertText("<p>"); 
            insertVideoElement(url);
            insertText("</p>"); 
          break;

        
        default:
            fileName = getFileName(url);
            insertText("<p>"); 
            insertLink(url, fileName);
            insertText("</p>"); 
    }  */
            
            
            
            html = '<img src="'+document+'">';

            
            
            
            
            if (ifCkeditor()) {
                  insertText(html);
            } else {
                $("#editor").append(html);     
            }
            
  
            $('#dialogBox').dialog('close');    
        
    }
    
</script>

    
    
    
    
    <ul table="_document">
    <li><a href="#" onclick="insertWizzard('[filedata]');"><img border="0" src="[filedata_100]" /> [filedata_filename]</a></li>
    
    </ul>
     